In [1]:
import cv2
In [2]:
import matplotlib.pyplot as plt
%matplotlib inline
In [3]:
img_RGB = cv2.imread('demo1.jpg')
In [4]:
plt.imshow(cv2.cvtColor(img_RGB, cv2.COLOR_BGR2RGB))
Out[4]:
In [5]:
print('Shape_RGB:', img_RGB.shape)
In [6]:
print('Type_RGB:', img_RGB.dtype)
In [7]:
print('RGB intensity at 300,250:',img_RGB[300,250])
In [8]:
img_RGB_lineintensity = img_RGB[600]
In [9]:
plt.plot(img_RGB_lineintensity)
Out[9]: